#include<bits/stdc++.h>
#define int long long
#define endl "\n"

using namespace std;

signed main() {
	int n;
	char s1, s2;
	cin >> n >> s1 >> s2;
	string s;
	cin >> s;
	for(int i = 0; i < n; i ++ ) {
		if(s[i] != s1) {
			s[i] = s2;
		}
	}
	cout << s << endl;
	return 0;
}

